﻿'*******************************************************************************************
'* Copyright Brügmann Software GmbH, Papenburg
'* Author: Björn Kremer
'* Contact: codeplex<at>patorg.de
'* 
'* VB.CMIS is a VB.NET implementation of the Content Management Interoperability Services (CMIS) standard
'*
'* This file is part of VB.CMIS.
'* 
'* VB.CMIS is free software: you can redistribute it and/or modify
'* it under the terms of the GNU Lesser General Public License as published by
'* the Free Software Foundation, either version 3 of the License, or
'* (at your option) any later version.
'* 
'* VB.CMIS is distributed in the hope that it will be useful,
'* but WITHOUT ANY WARRANTY; without even the implied warranty of
'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'* GNU Lesser General Public License for more details.
'* 
'* You should have received a copy of the GNU Lesser General Public License
'* along with VB.CMIS. If not, see <http://www.gnu.org/licenses/>.
'*******************************************************************************************
Imports System.ServiceModel.Syndication
Namespace Atom
   <Xml.Serialization.XmlRoot("entry", Namespace:=CmisNamespaceConstants.Atom)>
   Public MustInherit Class CMISAtomEntry(Of T)
      Implements Xml.Serialization.IXmlSerializable

      Public Sub New()

      End Sub
      Public Sub New([object] As T, atomId As String, atomTitle As String, atomCreationDate As DateTimeOffset, atomLastUpdatedTime As DateTimeOffset, atomAuthors As List(Of SyndicationPerson))
         _object = [object]
         _atomId = atomId
         _atomCreationDate = atomCreationDate
         _atomLastUpdatedTime = atomLastUpdatedTime
         _atomTitle = atomTitle
         _atomAuthors = atomAuthors
      End Sub


      Private _atomId As String
      Public ReadOnly Property AtomId As String
         Get
            Return _atomId
         End Get
      End Property

      Private _atomTitle As String
      Public ReadOnly Property AtomTitle As String
         Get
            Return _atomTitle
         End Get
      End Property

      Private _atomLastUpdatedTime As DateTimeOffset
      Public ReadOnly Property AtomLastUpdatedTime As DateTimeOffset
         Get
            Return _atomLastUpdatedTime
         End Get
      End Property

      Private _atomCreationDate As DateTimeOffset
      Public ReadOnly Property AtomCreationDate As DateTimeOffset
         Get
            Return _atomCreationDate
         End Get
      End Property

      Private _atomAuthors As List(Of SyndicationPerson)
      Public ReadOnly Property AtomAuthors As List(Of SyndicationPerson)
         Get
            Return _atomAuthors
         End Get
      End Property


      Private _object As T
      Public Property [Object] As T
         Get
            Return _object
         End Get
         Protected Set(value As T)
            _object = value
         End Set
      End Property


      Public Property Children As CMISAtomFeed(Of T)

      Public Function GetSchema() As Xml.Schema.XmlSchema Implements Xml.Serialization.IXmlSerializable.GetSchema
         Return Nothing
      End Function

      Public Overridable Sub ReadXml(reader As Xml.XmlReader) Implements Xml.Serialization.IXmlSerializable.ReadXml

      End Sub

      Public Sub WriteXml(writer As Xml.XmlWriter) Implements Xml.Serialization.IXmlSerializable.WriteXml
         Throw New NotImplementedException
      End Sub
   End Class
End Namespace